package com.family.thirdpart.controller;

import com.family.common.utils.R;
import com.family.thirdpart.crawler.HorseCrawler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CrawlerStart {
    @Autowired
    private HorseCrawler horseCrawler;
    /**
     * 爬取房源
     * @return
     */
    @RequestMapping("/crawler")
    public R crawler(){
        Integer start = horseCrawler.start();
        return R.ok().put("data",start);
    }
}
